package top.kaoshanji.p2ch15c;

/**
 * 代码清单-p2ch15c-172页b：调用者Invoker类
 * @author kaoshanji
 * ^_^
 * create time 2025/3/23 17:52
 */
public class Invoker {

    private Command command;

    // 受气包，接受命令
    public void setCommand(Command command) {
        this.command = command;
    }

    // 执行命令
    public void action() {
        this.command.execute();
    }

}
